<template>
  <div id="nrs2002">
   <div class="rom">
      <div class="top">
        <van-nav-bar
          class="van-nav-bar"
          title="NRS2002"
          left-text="返回"
          left-arrow
          @click-left="onClickLeft()"
          @click-right="$router.push(`/nrsList/${detailId}`)"
          fixed 
          placeholder
        ></van-nav-bar>
        <div class="date">{{list.created !== undefined ? list.created.split(" ")[0] : '' }}</div>
      </div>
      <div class="bom">
        <div class="bom-info">
          <div class="journalTitle">
            <!-- <img src="@/assets/images/journal/stjyd.png" alt /> -->
            <h1>基本情况记录</h1>
          </div>
          <van-row type="flex" justify="space-between" align="center">
            <van-col span="20">
              <van-field 
              readonly
              v-model="list.tizhong" 
              label="当前体重" 
              type="number" 
              maxlength="6"
              />
            </van-col>
            <van-col span="3" class="company">kg</van-col>
          </van-row>
          <van-row type="flex" justify="space-between" align="center">
            <van-col span="20">
              <van-field
                readonly
                v-model="list.shengao"
                label="身高"
                type="number"
                maxlength="6"
                />
            </van-col>
            <van-col span="3" class="company">cm</van-col>
          </van-row>
          <van-row type="flex" justify="space-between" align="center">
            <van-col span="20">
              <van-field
                v-model="list.bmi"
                label="BMI"
                type="number"
                maxlength="6"
                readonly
              />
            </van-col>
            <van-col span="3" class="company">%</van-col>
          </van-row>

        </div>
        <div class="bom-info bom-infoTow main">
          <div class="journalTitle">
            <!-- <img src="@/assets/images/journal/stzz.png" alt /> -->
            <h1>疾病状态</h1>
            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="1、是否有骨盆骨折 或者 慢性病患者合并有以下疾病：肝硬化、慢性阻塞性肺病、长期血液透析、糖尿病、肿瘤？"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.jibing1" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>
     

            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="2、是否有腹部重大手术、中风、重症肺炎、血液系统肿瘤？"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.jibing2" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>

            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="3、是否有颅脑损伤、骨髓抑制、加护病患（APACHE>10分）"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.jibing3" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>

          </div>
 
          <div class="line"></div>

          <div class="journalTitle">
            <!-- <img src="@/assets/images/journal/stzz.png" alt /> -->
            <h1>营养状态</h1>
            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="1、是否3个月内体重减轻>5%或最近1个星期进食量（与需要量相比）减少20%~50%"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.yingyang1" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>
            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="2、2个月内体重减轻>5%或BMI18.5~20.5或最近1个星期进食量（与需要量相比）减少50%~75%"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.yingyang2" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>
         
            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="3、是否1个月内体重减轻>5%（或3个月内减轻>15%）或BMI＜18.5（或血清白蛋白＜35g/L）或最近1个星期进食量（与需要量相比）减少70%~100%"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.yingyang3" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>
          
          </div>
          <div class="line"></div>
          <div class="journalTitle">
            <!-- <img src="@/assets/images/journal/stzz.png" alt /> -->
            <h1>年龄</h1>
            <van-row type="flex" justify="space-between" align="center">
              <van-col class="old">
                <van-field
                  readonly
                  label="1、年龄是否≥70岁"
                  placeholder=""
                />
              </van-col>
            </van-row>
            <van-radio-group style="padding-left:16px" v-model="list.age" direction="horizontal">
              <van-radio disabled icon-size="12px" :name="1">是</van-radio>
              <van-radio disabled icon-size="12px" :name="0">否</van-radio>
            </van-radio-group>
           
          </div>
          
        </div>
        <div class="bom-info main" >
          <div class="journalTitle">
            <!-- <img src="@/assets/images/journal/stjyd.png" alt /> -->
            <h1>处理意见</h1>
          </div>
          <div class="weightCon">
            <p style="font-size: 15px;text-align:left;">
              测评得分：{{defen}}分
            </p> 
            <p style="font-size: 15px;text-align:left;">
              {{p}}
            </p> 
          </div>
        
        </div>
      </div>
   </div>
  </div>
</template>
<script>

export default {

  data() {
    return {
      date:null,
      list: {
        hzid:null,
        tizhong:'',
        shengao:'',
        bmi:'',
        jibing1:'',
        jibing2:'',
        jibing3:'',
        yingyang1:'',
        yingyang2:'',
        yingyang3:'',
        age:''
      },
      defen:"",
      p:'',
    };
  },

  methods: {
    onClickLeft() {
      this.$router.go(-1); //返回上一层
      localStorage.removeItem('nrs2002')
    }

  },
  mounted() {
    var arr = localStorage.getItem('nrs2002')
     if(arr != null){
      this.list = JSON.parse(arr)
       if(this.list.zongfen>=3){
          this.defen = this.list.zongfen
          this.p = "患者有营养不良的风险，需营养支持治疗"
        }else if(this.list.zongfen<3){
          this.defen = this.list.zongfen
          this.p = "若患者将接受重大手术，则每周重新评估其营养状况"
        }
     }
  },
  created() {
    this.list.hzid = this.$route.params.id;
    this.detailId = this.$route.params.id;
  },
};
</script>
<style lang="less">
html {
  min-height: 100vh;
  background-color: #fff;
}
#nrs2002 {
  min-height: 100vh;
  background: #f5f5f5;
  padding-bottom: 15px;
  .van-cell{
    padding-bottom: 0px;
  }
  .ps{
    .van-cell__title{
      color:#51a8e2
    }
    
  }
  .rom{
    height: 100vh;
    // overflow: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }
  .rom::-webkit-scrollbar {
  display: none; /* Chrome Safari */
  }
  .heaTitle{
    width: 90%;
    margin: 15px auto;
    display: flex;
    align-items: flex-end;
    p{
      display: inline-block;
    }
    .p2{
      font-size: 12px;
      margin-left: 5px;
    }
  }
  .old .van-cell__title{
    span{
      display: block;
      width: 80vw;
    }
  }
  .top {
    height: 150px;
    background: #4e8af4;
    .van-nav-bar {
      color: #fff;
      border: 0 solid #4e8af4;
      background: #4e8af4;
      div {
        color: #fff;
        span {
          color: #fff;
        }
        i {
          color: #fff;
        }
      }
    }
    .van-hairline--bottom::after {
      border-bottom-width: 0px;
    }
    .date {
      width: 120px;
      height: 30px;
      border-radius: 10px;
      margin: 25px auto 0;
      background: #fff;
      text-align: center;
      line-height: 30px;
      font-size: 15px;
    }
  }

  .bom-info {
    width: 94.53%;
    border-radius: 10px;
    margin: 15px auto 0;
    padding: 20px 12px;
    background: #fff;
    .journalTitle {
      display: flex;
      align-items: flex-start;
      flex-direction: column;
      margin-bottom: 15px;
      img {
        width: 40px;
        height: 40px;
      }
      h1 {
        font-size: 16px;
        // color: #3b8afc;
        color: #000;
        font-family: SourceHanSansCN;
        font-weight: bold;
      }
    }
    .eat,
    .atPresent,
    .symptom,
    .activity,
    .weight{
       width: 100%;
       color: #929292;
       margin-top: 15px;
        .titleP{
          width: 100%;
          margin-bottom: 10px;
          font-size: 15px;
          text-align: left;
          font-weight: bold;
          color: #000000;
        }
        .eatCon{
          display: flex;
          align-items: flex-start;
          p{
            text-align: left;
          }
          .subject{
            p{
              margin-top: 2px;
            }
          }
        }
        .subjectCon{
          display: flex;
          align-items: center;
          .checkBox{
            margin-right: 20px;
          }
        }
      }
    .atPresent .subjectCon,
    .symptom .subjectCon,
    .activity .subjectCon{
      flex-direction: column;
      align-items: flex-start;
      .checkBox{
        margin-top: 10px;
      }

    }
    .activity{
      .van-radio{
        width: 100%;
      }
    }
    .serialNumber{
      font-size: 12px;
      display: inline-block;
      margin-right: 10px;
      margin-top: 5px;
      color: #fff;
      width: 16px;
      min-width: 16px;
      height: 16px;
      line-height: 20px;
      border-radius: 50%;
      background: #64C412;
    }
    
  }
  .van-radio{
    margin-top: 10px;
    align-items: flex-start;
    .van-radio__label{
      color:#929292;
      font-size: 14px;
      text-align-last: left;
    }
    
  }
 
  .van-checkbox{
    display: flex;
    align-items: center;
    .van-checkbox__label{
      color:#929292;
      font-size: 14px;
      margin-top: 4px;
    }
  }
  .line{
    width: 108%;
    margin: 15px 0 15px -4%;
    height: 1px;
    background: #D2D2D2;
    opacity: 0.5;
  }
  .weightCon{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 15px;
    color:#919191;
    .problemBox{
      display: flex;
      align-items: center;
      .problem{
        width: 47vw;
        text-align: left;
        margin-top: 10px;
        margin-right: 25px;
      }
      .serialNumber{
        margin-top: 10px;
      }
    }
    .serialNumber{
      margin-top: 0;
    }
  }
  .van-radio__icon{
    margin-top: 2px;
  }
  .van-radio__icon .van-icon,.van-checkbox__icon .van-icon{
    font-size: inherit;
  }
   .btn{
    width: 90vw;
    margin: 15px auto;

  }
   .van-radio__icon--disabled.van-radio__icon--checked .van-icon,
  .van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon {
      color: #fff;
      background-color: #1989fa;;
      border-color: #1989fa;;
  }
    
}
</style>

